#ifndef DATABASE_H
#define DATABASE_H

#include "DataHelper.h"

#include "QString"
#include "QSqlDatabase"
#include "QColor"

class DataBase
{
public:
    DataBase();

    static void init        (QString *dbFile);
    static void selectTasks (QVector<Task*> *tasks);
    static void selectGroups(QVector<Group*> *groups);
    static void saveTasks   (QVector<Task*> *tasks);
    static void saveGroups  (QVector<Group*> *groups);

private:
    static QSqlDatabase db;
    static QVector<Group*> *groups;

    static Group* groupById(int id);
};

#endif // DATABASE_H
